fix: Group by field dependency without selection - #4966
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (35)
🧰 Additional context used🧠 Learnings (3)📚 Learning: 2026-03-27T08:24:16.083ZApplied to files:
📚 Learning: 2026-06-18T16:47:47.339ZApplied to files:
📚 Learning: 2026-06-18T16:47:47.339ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughWalkthrough
ChangesGroupBy hidden dependency fix
Sequence DiagramssequenceDiagram
participant toSelect
participant resolveGroupByDependencies
participant mapping
participant fields
toSelect->>resolveGroupByDependencies: selectRequest, fields, mapping
resolveGroupByDependencies->>mapping: remap object/relation field to FK ID
resolveGroupByDependencies->>mapping: ensure GROUP field is mapped
resolveGroupByDependencies->>fields: append missing groupBy fields as hidden deps
resolveGroupByDependencies-->>toSelect: updated fields or error
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4966 +/- ##
===========================================
+ Coverage 76.21% 76.29% +0.08%
===========================================
Files 606 606
Lines 46810 46831 +21
===========================================
+ Hits 35675 35727 +52
+ Misses 8322 8304 -18
+ Partials 2813 2800 -13
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
| testUtils "github.com/sourcenetwork/defradb/tests/integration" | ||
| ) | ||
|
|
||
| // This is a regression test for https://github.com/sourcenetwork/defradb/issues/4954. |
There was a problem hiding this comment.
question: Why the verbosity on this particular test? And why the link to a specific github issue? I am asking because I just commented on a third-party contributor PR, stating that we typically don't do this -- which, historically, is true.
Are we moving into a different direction with introducing regression tests, and how we document them? If so, I'm not against it. I just think we should seek to be consistent.
I would like an answer, but what that answer is does not affect my approving this PR. Gonna give it the LGTM.
There was a problem hiding this comment.
todo: Please remove the link to the issue :)
fredcarle
left a comment
There was a problem hiding this comment.
LGTM. Just one very minor nitpick todo.
5054276 to
a7a15b7
Compare
|
In the interest of not losing valuable work: is there anything else that needs to be done here, or can we merge? @jsimnz |
Relevant issue(s)
Resolves #4954
Description
Added an explicit step to mapper to resolve group by dependencies instead of relying on implicit selection set field resolvers.
Tasks
How has this been tested?
Manual, added integration tests to cover various cases
Specify the platform(s) on which this was tested: